<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        //箭头函数
        const person = {
            name: 'zyw',
            age: 22
        }

        /*let hello = function (obj) {
            console.log("hello," + obj.name)
        }
        hello(person)*/
        //传参时解构，解构时()不能省略
        //传入对象，把name属性解构出来
        let hello = ({name}) => console.log("hello," + name)
        hello(person)
    </script>
</head>
<body>

</body>
</html>